package com.haois.ws.api.module.traffic.dao.mapper;

import com.haois.ws.api.module.traffic.daomain.Traffic;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by haol on 2017/4/22.
 */
@Repository
public interface TrafficMapper {


    void updateAppCount(@Param("appId") String appId);

    void saveRecord(@Param("record") Traffic traffic);

    int getLastId();

   List<Traffic> getRecordByAccount(@Param("account") String account);

    List<Traffic> getRecordByAppId(@Param("appId") String appId);

    List<Traffic> getAllRecord();

    Traffic getRecordById(@Param("id") int id);

    List<Integer> getIgnIdByIpAndAppId(@Param("ignoreIp") String ignoreIp, @Param("appId") String appId);

    void deleteRecordByAppId(@Param("appId") String appId);

    void addIgnCount(@Param("appId") String appId);

    void deleteRecordByAppIdAndIp(@Param("appId") String appId, @Param("ip") String ip);

    void update(@Param("record") Traffic traffic);



   }
